<?php
namespace Admin\Controller;
use Think\Controller;
class OrderController extends BaseController {
    
	protected function _initialize(){
		parent::_initialize();
	}
	
	//订单管理
	public function index(){
		//
	}
	
	//订单列表
	public function orderlist(){
		$m=M('bb_order');
		$p=$_GET['p']?$_GET['p']:1;
		$psize=C('BB_PSIZE')?C('BB_PSIZE'):20;
		$map='';
		$data=$m->where($map)->page($p,$psize)->order('addtime desc')->select();
		$count=$m->where($map)->count();
		$this->getPage($count, $psize, 'bb-loader', '订单管理','bb-search');
		foreach ($data as $k => $v){
			
		}
		//p($data);
		$this->assign('cache',$data);
		$this->display();
	}
	

	
	//删除黑名单
	public function orderdel(){
		$id=I('id');
		if($id){
			M('bb_order')->delete($id);
			if($re){
				$info['status']=1;
				$info['msg']='删除成功!';
			}else{
				$info['status']=0;
				$info['msg']='删除失败!';
			}
			$this->ajaxreturn($info);
		}
	}
}